var express = require('express');
var router = express.Router();
var dataCtrl = require("../controllers/category.controller");

router.post("/", dataCtrl.create); //创建
router.put("/:id", dataCtrl.update); //更改
router.get("/:id", dataCtrl.selectbyId); //根据id查找
router.post("/list/:type", dataCtrl.list); //整理成树形
router.delete("/:id", dataCtrl.remove); //删除

module.exports = router;